package com.person.mall.service;

import com.person.mall.form.CartAddForm;
import com.person.mall.form.CartUpdateForm;
import com.person.mall.pojo.Cart;
import com.person.mall.vo.CartVo;
import com.person.mall.vo.ResponseVo;

import javax.xml.crypto.Data;
import java.util.List;

/**
 * @author 最酷的桃儿wjc
 * * @date 2022/5/19
 */
public interface ICartService {

    /**
     * 添加购物车
     * @param cartAddForm
     * @return
     */
    public ResponseVo<CartVo> addCart(Integer uid,CartAddForm cartAddForm);

    /**
     * 获取购物车
     */

    public ResponseVo<CartVo> cartList(Integer uid);

    /**
     * 更新购物车
     * @param uid
     * @param productId
     * @param cartUpdateForm
     * @return
     */
    public ResponseVo<CartVo> update(Integer uid, Integer productId, CartUpdateForm cartUpdateForm);

    /**
     * 删除购物车
     */

    public ResponseVo<CartVo> delete(Integer uid,Integer productId);

    /**
     * 获取数量
     * @param uid
     * @return
     */
    public ResponseVo<Integer> sumData(Integer uid);

    /**
     * 全选中
     * @param uid
     * @return
     */
    public ResponseVo<CartVo> selectAll(Integer uid);

    /**
     * 全不选中
     * @param uid
     * @return
     */
    public ResponseVo<CartVo> unselectAll(Integer uid);


    /**
     * 根据用户id获取购物车列表
     * @param uid
     * @return
     */
    public List<Cart> cartListForSelect(Integer uid);
}
